#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>

using namespace std;

string path;
vector<string> ret;

void dfs(string s, int pos, string path)
{
    if (path.size() == s.size())
    {
        ret.push_back(path);
        return;
    }

    if (s[pos] >= 'a' && s[pos] <= 'z')
    {
        dfs(s, pos + 1, path + s[pos]);

        dfs(s, pos + 1, path + (char)(s[pos] - 32));
    }
    else if (s[pos] >= 'A' && s[pos] <= 'Z')
    {
        dfs(s, pos + 1, path + s[pos]);

        dfs(s, pos + 1, path + (char)(s[pos] + 32));
    }
    else
    {
        dfs(s, pos + 1, path + s[pos]);
    }
}

vector<string> letterCasePermutation(string s) {
    dfs(s, 0, path);
    return ret;
}

int main()
{
	string path = "a";
	string s = "abc";
	for (int i = 0; i < s.size(); ++i)
	{
		std::cout << s[i] - 32 << endl;
	}
	return 0;
}